<layout name="layout" />

<div class="main-div">
    <form name="main_form" method="POST" action="__SELF__">
    	<input type="hidden" name="id" value="<?php echo $data['id']; ?>" />
        <table cellspacing="1" cellpadding="3" width="100%">
        	<tr>
                <td class="label">上级分类：</td>
                <td>
                    <select name="parent_id">
                    	<option value="0">顶级分类</option>
                    	<?php foreach ($catData as $k => $v): 
                    			// 跳过当前分类和子分类
                    			if($v['id'] == $data['id'] || in_array($v['id'], $children))
                    				continue ;
                    			if($v['id'] == $data['parent_id'])
                    				$select = 'selected="selected"';
                    			else 
                    				$select = '';
                    	?>
                    	<option <?php echo $select; ?> value="<?php echo $v['id']; ?>"><?php echo str_repeat('-', 8*$v['level']) . $v['cat_name']; ?></option>
                    	<?php endforeach; ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="label">分类名称：</td>
                <td>
                    <input size="60" type="text" name="cat_name" value="<?php echo $data['cat_name']; ?>" />
                </td>
            </tr>
            <tr>
                    <td class="label">推荐到楼层：</td>
                    <td>
                        <input type="radio" name="is_floor" value="是" <?php if($data['is_floor'] == '是') echo 'checked="checked"'; ?> /> 是
                        <input type="radio" name="is_floor" value="否" <?php if($data['is_floor'] == '否') echo 'checked="checked"'; ?> /> 否
                    </td>
                </tr>
            <tr>
                <td colspan="99" align="center">
                    <input type="submit" class="button" value=" 确定 " />
                    <input type="reset" class="button" value=" 重置 " />
                </td>
            </tr>
        </table>
    </form>
</div>


<script>
</script>